package org.skyui.core;

import org.skyui.controllers.NavigationController;

import com.vaadin.data.Container;
import com.vaadin.ui.AbstractSelect;
import com.vaadin.ui.Tree;

public class NavigationTree extends Tree {

	/**
	 * 
	 */
	private static final long serialVersionUID = -3746044134609029836L;

	public NavigationTree(Container container) {
		setSelectable(true);
		setMultiSelect(false);
		setNullSelectionAllowed(false);
		setContainerDataSource(container);
		setItemCaptionMode(AbstractSelect.ITEM_CAPTION_MODE_PROPERTY);
		setItemCaptionPropertyId(NavigationController.CAPTION_PROPERTY);
		setItemIconPropertyId(NavigationController.IMAGE_PROPERTY);
		setImmediate(true);
	}
}
